package test2.controller;

import fun.stgoder.bmwf.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import test2.domain.Test2;
import test2.service.Test2Service;

import java.util.List;

@RestController
@RequestMapping("/test2")
public class Test2Controller {
    @Autowired
    Test2Service test2Service;

    @GetMapping("/f1")
    R<List<Test2>> f1(@RequestParam(value = "p", required = false) String p) {
        List<Test2> list = test2Service.f1(p);
        return R.ok(list);
    }
}
